import request from '@/utils/request'

// 查询dealer列表
export function list(pageSize,pageNum) {
    const data = {
        pageSize,
        pageNum,
    }
    return request({
      url: '/system/dealer/list',
      method: 'get',
      params: data
    })
  }

// 新增dealer
export function add(data) {
  
    return request({
      url: '/system/dealer',
      method: 'post',
      params: data
    })
  }
  // 删除dealer
export function del(id) {
    return request({
      url: '/system/dealer/'+id,
      method: 'DELETE',
    })
  }
// 修改dealer
export function update(data) {

  return request({
      url: '/system/dealer',
      method: 'put',
      params: data
  })
}
   // 查询dealer详情
export function dealer(id) {
  return request({
    url: '/system/dealer/'+id,
    method: 'get',
  })
}
// 搜索商品
export function inquire(data) {
  return request({
      url: '/system/dealer/list/',
      method: 'get',
      params: data
  })
}
  // 财务统计
export function count() {
  return request({
    url: '/system/dealer/count',
    method: 'get',
  })
}
// 提现记录
export function extractList() {
  return request({
    url: '/system/extract/list',
    method: 'get',
  })
}
// 修改提现记录
export function updateExtract(data) {

  return request({
      url: '/system/extract',
      method: 'put',
      params: data
  })
}
  // 查询提现详情
export function extract(id) {
  return request({
    url: '/system/extract/'+id,
    method: 'get',
  })
}